<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>乐盈斗牌</title>

    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1.0" 
	name="viewport">

    <style type="text/css">
        #weixin-tip {
            display: none;
            position: fixed;
            left: 0;
            top: 0;
            background: rgba(0, 0, 0, 0.8);
            filter: alpha(opacity=80);
            width: 100%;
            height: 100%;
            z-index: 100;
        }

        #weixin-tip p {
            text-align: center;
            margin: 0;
            height: 100%;
            position: relative;
        }

        #weixin-tip p img {
            width: 100%;
            height: 100%;
        }

        #weixin-tip .close {
            color: #fff;
            padding: 5px;
            font: bold 24px/26px simsun;
            text-shadow: 0 1px 0 #ddd;
            position: absolute;
            top: 0;
            left: 5px;
        }

        .hide {
            display: none;
        }

        /* 提示框*/
        .confirmBox {
            position: fixed;
            top: 0;
            left: 0;
            padding-top: 45%;
            display: -webkit-box;
            display: -ms-flexbox;
            display: -webkit-flex;
            display: flex;
            background: rgba(0, 0, 0, 0.4);
            width: 100%;
            height: 500px;
            visibility: hidden;
        }

        .confirmBox .row1 {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
        }

        .confirmBox .row2 {
            position: relative;
            width: 290px;
        }

        .confirmBox .row2 .info {
            width: 100%;
            background-color: rgba(253, 253, 253, 0.95);
            display: inline-block;
            border-radius: .3em;
        }

        .confirmBox .row2 .info h2 {
            padding-top: 1em;
            margin-bottom: 10px;
            font-weight: bold;
            text-align: center;
            font-size: 16px;
        }

        .confirmBox .row2 .info .con {
            padding: 0 1em 1em 1em;
            text-align: center;
            font-size: 14px;
            line-height: 1.4;
        }

        .confirmBox .row2 .info .btn-box {
            display: -webkit-box;
            -webkit-box-orient: horizontal;
            -webkit-box-pack: justify;
            border-top: 1px #ECECEE solid;
        }

        .confirmBox .row2 .info .btn-box .btn-confirm {
            -webkit-box-flex: 1;
            padding: 14px 0;
            text-align: center;
            font-size: 16px;
            color: #0080FA;
        }

        .confirmBox .row2 .info .btn-box .btn-cancel {
            -webkit-box-flex: 1;
            padding: 14px 0;
            text-align: center;
            font-size: 16px;
            color: #0080FA;
            border-right: 1px #ECECEE solid;
        }

        .confirmBox .row3 {
            -webkit-box-flex: 1;
            -webkit-flex: 1;
            -ms-flex: 1;
            flex: 1;
        }

        @media only screen
        and (min-device-width: 240px)
        and (max-device-width: 700px)
        and (orientation: landscape) {
            /*iphone landscape */
            .confirmBox {
                padding-top: 20% !important;
            }

        }

        /*滚动浮层*/
        .overlay {
            width: 100%;
            position: fixed;
            bottom: -900px;
            left: 0px;
            z-index: 11;
        }

        .overlay .header {
            background-color: #F3F3F3;
            text-align: center;
            padding: 10px;
            position: relative;
            font-size: 14px;
            color: #666666;
            font-weight: bold;
        }

        .overlay .header a {
            display: block;
            position: absolute;
            right: 10px;
            top: 10px;
        }

        .overlay .content {
            padding: 10px;
            background-color: #fff;
        }

        .overlay .content .tit {
            margin-top: 0;
            font-size: 12px;
            color: #666666;
            margin-bottom: 10px;
        }

        .overlay .btn-list {
            position: relative;
        }

        .overlay .content #jc {
            text-decoration: underline;
            color: #ee272f;
            font-size: 12px;
            line-height: 26px;
            position: absolute;
            bottom: 0;
            right: 10px;
        }

        .overlay .content #btn-trust {
            display: block;
            margin: 30px auto 10px auto;
            color: #00A0EC;
            font-size: 14px;
            border-radius: 3em;
            padding: 5px;
            width: 40%;
            text-align: center;
            border: 1px solid #00A0EC;
            line-height: 26px;
        }

        .overlay .content .step1 {
            display: block;
            width: 80%;
            margin: 0 auto 20px auto;
        }

        .overlay .content .sign {
            text-decoration: none;
            border: 1px solid #dddddd;
            border-radius: .3em;
            padding: 7px 10px;
            display: -webkit-box;
            -webkit-box-orient: horizontal;
            -webkit-box-pack: justify;
            -webkit-box-align: center;
            margin: 0 auto;
        }

        .overlay .sign img {
            display: block;
            width: 40px;
            height: 41px;
            margin-right: 10px;
        }

        .overlay .sign p {
            font-size: 14px;
            color: #B5B5BB;

        }

        .overlay .sign p.sign-name {
            width: 80%;
            overflow: hidden;
            color: #000;
            white-space: nowrap;
            text-overflow: ellipsis;
        }

        .overlay .finger {
            display: block;
            width: 24px;
            position: relative;
            top: -15px;
            float: right;
            right: 0;
            z-index: 12;
        }

        a {
            color: #8a8a8a;
            text-decoration: none;
            letter-spacing: 1px;
        }
    </style>
    <script type="text/javascript" src="./static/down/zepto.min.js"></script>
    <style type="text/css"></style>
    <script type="text/javascript">
        var is_weixin = function () {
            var ua = navigator.userAgent.toLowerCase();
            if (ua.match(/MicroMessenger/i) == "micromessenger") {
                return true;
            } else {
                return false;
            }
        }
        function doLocation(url) {
            var a = document.createElement("a");
            if (!a.click) {
                window.location = url;
                return;
            }
            a.setAttribute("href", url);
            a.style.display = "none";
            document.body.appendChild(a);
            a.click();
        }
        function downandroid() {
            if (is_weixin()) {
                var winHeight = typeof window.innerHeight != "undefined" ? window.innerHeight : document.documentElement.clientHeight;
                //兼容IOS，不需要的可以去掉
                var tip = document.getElementById("weixin-tip");
                var close = document.getElementById("close");
                tip.style.height = winHeight + "px";
                //兼容IOS弹窗整屏
                tip.style.display = "block";
                close.onclick = function () {
                    tip.style.display = "none";
                }
            } else {
			    //window.location.href = "敬请期待...";
                //window.location.href = "http://update.hongshihuyu.com/leying/app/android/leying-release.apk?ts=" + (new Date()).getTime().toString();
                 window.location.href = "https://fir.im/fe8k";
				return;
            }
        }

        function downios() {
            if (is_weixin()) {
                var winHeight = typeof window.innerHeight != "undefined" ? window.innerHeight : document.documentElement.clientHeight;
                //兼容IOS，不需要的可以去掉
                var tip = document.getElementById("weixin-tip");
                var close = document.getElementById("close");
                tip.style.height = winHeight + "px";
                //兼容IOS弹窗整屏
                tip.style.display = "block";
                close.onclick = function () {
                    tip.style.display = "none";
                }
            } else {
			    //window.location.href = "敬请期待...";
                //window.location.href = "https://itunes.apple.com/us/app/%E4%B8%AB%E4%B8%AB%E7%A2%B0%E8%83%A1%E5%AD%90/id1220789852?l=zh&ls=1&mt=8";
                //window.location.href = "https://fir.im/7myz";
				//return;
               
                if (userAgent.indexOf('os 9') != -1 && !is_weixn() && !is_weibo()) {
                    var isSafari = userAgent.indexOf("safari") > -1 && userAgent.indexOf("chrome") < 1 && userAgent.indexOf("crios") < 1;
                    if (isSafari) {
                        $('.weixin-app-download-mask').show();
                        $(".overlay").animate({bottom: "0"});
                    } else {
                        setTimeout("$('.confirmBox').css('visibility', 'visible')", 3000);
                    }
                }
                doLocation("https://fir.im/7myz");
                
            }
        }
    </script>
</head>
<body>
<table width="100%" cellspace="0">
    <tbody>
    <tr align="center">
        <td>
            <img width="250px" src="./static/down/Icon-250-youxian.png">
        </td>
    </tr>
    <tr align="center">
        <td></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td align="center">
            <img src="./static/down/download_android_btn.png" onclick="downandroid();">
            <img src="./static/down/download_ios_btn.png" onclick="downios();">
        </td>
    </tr>
    <!--  -->
    <tr>
        <td align="center">
            <div class="btn-box">
                <div class="btn-tip">
                    <img src="./static/down/setting.png">
                    <p class="sign-name">IOS安装说明</p>
              </div>
            </div>  
        </td>
    </tr>

    <tr>
        <td align="center">
            <p style="font-size: 12px; font-family: 微软雅黑; padding-top: 12px;">
                微信不允许直接下载文件，请点击右上角分享按钮，
            </p>
			<p style="font-size: 12px; font-family: 微软雅黑; padding-top: 12px;">
                选择在浏览器中打开, 或者复制链接到浏览器。
            </p>
            <br>
        </td>
    </tr>
    </tbody>
</table>
<div id="weixin-tip">
    <p>
        <img src="./static/down/live_weixin.png" alt="微信扫描打开APP下载链接提示代码优化">
        <span id="close" title="关闭" class="close">×</span>
    </p>
</div>
<section class="confirmBox">
    <div class="row1"></div>
    <div class="row2">
        <div class="info">
            <h2>提示未受信任企业级开发者?</h2>

            <div class="con">
                iOS系统的限制，首次打开前需要进入【设置&gt;&gt;通用&gt;&gt;设备管理】，找到对应的开发者证书，选择【信任】即可打开
            </div>
            <div class="btn-box">
                <div class="btn-cancel">
                    关闭
                </div>
                <div class="btn-confirm">
                    详细教程
                </div>
            </div>
        </div>

    </div>
    <div class="row3"></div>
</section>
<section class="overlay">
    <div class="header">安装提示<a href="javascript:void(0);" id="btn-cancel">×</a></div>
    <div class="content">
        <p class="tit">&nbsp;&nbsp;安装完成后，首次打开APP需要信任下方的描述文件</p>
        <a class="sign" href="https://www.imaibei.com/download/imaibei.mobileprovision">
            <img src="./static/down/setting.png">
            <p class="sign-name">Xiamen Mixun Technology Co., Ltd.</p>
            <p>&gt;</p>
        </a>
        <img src="./static/down/finger.png" class="finger">

        <div class="btn-list">
            <a href="https://www.imaibei.com/download/imaibei.mobileprovision" id="btn-trust">去信任</a>
            <a href="https://www.imaibei.com/download/guide.html" id="jc">详细教程&gt;</a>
        </div>

    </div>
</section>

<script>
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?05834118949b84f6fadefdff93a09de8";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();

    var userAgent = navigator.userAgent.toLowerCase();
    /*滚动浮层 取消*/
    $('#btn-cancel').click(function () {
        $('.overlay').animate({bottom: "-900px"});
    });

    /*提示框 取消&确认*/
    $('.btn-cancel').click(function () {
        $('.confirmBox').css('visibility', 'hidden');
    });
    
    $('.btn-tip').click(function () {
        $('.confirmBox').css('visibility', 'visible');
    });
    
    $('.btn-confirm').click(function () {
        //window.open("http://www.hongshihuyu.com/setup");
        window.location.href="http://www.hongshihuyu.com/setup";
    });
    
    /*判断是否是微博或微信*/
    function is_weixn() {
        var ua = navigator.userAgent.toLowerCase();
        if (ua.match(/MicroMessenger/i) == "micromessenger") {
            return true;
        } else {
            return false;
        }
    }
    function is_weibo() {
        var ua = navigator.userAgent.toLowerCase();
        if (ua.match(/Weibo/i) == "weibo") {
            return true;
        } else {
            return false;
        }
    }
    function addClass(el, css) {
        el.className = el.className + ' ' + css;
    }
    function removeClass(el, css) {
        el.className = el.className.replace(css, '');
    }
    function closeCover() {
        removeClass(document.querySelector('.popup'), 'show');
        addClass(document.querySelector('.popup'), 'hide');
        return false;
    }

    if (is_weixn() || is_weibo()) {
        var tags = document.getElementsByTagName('a');
        for (var i = 0; i < tags.length; i++) {
            if (tags[i].className == "d d1" || tags[i].className == "d d2") {
                tags[i].addEventListener('click', function (e) {
                    e.preventDefault();
                    removeClass(document.querySelector('.popup'), 'hide');
                    addClass(document.querySelector('.popup'), 'show');
                    return false;
                });
            }
        }

    }

    function GetQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]);
        return null;

    }
    var s = GetQueryString("s");
    if (s == "www") {
        removeClass(document.querySelector('.pc'), 'hide');
    }
</script>
</body>
</html>
